package developer.zyk.global.upload.upload;


import developer.zyk.global.user.bo.UserInfo;

import java.util.UUID;

/**
 * @author zhangyongkang
 * @time 2025/5/14 15:11
 * @description
 */
public class PathHelper {

    public static String getPath(String type, String fileName, UserInfo userInfo) {
        fileName = UUID.randomUUID() + "-" + fileName;
        return switch (type) {
            case "global" -> "ai-hub/global/" + fileName;
            case "private" -> "ai-hub/private/" + userInfo.getUserName() + "/" + fileName;
            default -> "ai-hub/common/" + fileName;
        };
    }
}
